Ext.define('appmod.view.role.authorization.Module', {
    extend: 'Ext.panel.Panel',
    alias: [
		'widget.moduleauthorizationpanel',
		'widget.role.auth.modulepanel',
		'widget.role-auth-modulepanel'
	],
	requires:[
		'appmod.view.role.authorization.ModuleList',
		'appmod.view.role.authorization.ModuleFunctionList'
	],
	layout:{
		type:'border'
	},
    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
        	items: [
			// --- load defined panel ---
			{
				padding:5,
				xtype:'authmodulelistpanel',
				region:'center'
			}
			,
			{
				padding:'5 5 5 0',
				width : 180,
				xtype:'authmodulefunctionlistpanel',
				region:'east'
			}
			]			
        });

        me.callParent(arguments);
    },
	
	bindModuleStore:function(store) {
		var authmodulelistpanel = this.down('authmodulelistpanel');
		authmodulelistpanel.bindStore(store);
	},
	
	bindFunctionStore:function(store) {
		var listpanel = this.down('authmodulefunctionlistpanel');
		listpanel.bindStore(store);		
	}
	

	
});